import {
    Icon,
    Sidebar,
    SidebarItem,
    Uploader,
    Tab,
    Tabs,
    Cell,
    CellGroup,
    Button,
    Field,
    Dialog,
    Swipe,
    SwipeItem,
    SwipeCell,
    Area,
    NavBar,
    Image,
    Form,
    Checkbox,
    CheckboxGroup,
    Collapse,
    CollapseItem,
    Sticky,
    TreeSelect,
    Divider,
    Notify,
    PullRefresh,
    Toast,
    Progress,
    Popover,
    Image as VanImage
} from "vant";

const vant = {
    install: function(Vue) {
        Vue.use(Icon);
        Vue.use(Tab);
        Vue.use(Tabs);
        Vue.use(Cell);
        Vue.use(Button);
        Vue.use(Field);
        Vue.use(Uploader);
        Vue.use(Swipe);
        Vue.use(SwipeItem);
        Vue.use(Area);
        Vue.use(NavBar);
        Vue.use(CellGroup);
        Vue.use(Image);
        Vue.use(Checkbox);
        Vue.use(CheckboxGroup);
        Vue.use(Sticky);
        Vue.use(SwipeCell);
        Vue.use(Collapse);
        Vue.use(CollapseItem);
        Vue.use(Sidebar);
        Vue.use(SidebarItem);
        Vue.use(TreeSelect);
        Vue.use(Divider);
        Vue.use(Form);
        Vue.use(PullRefresh);
        Vue.use(Progress);
        Vue.use(Popover);
        Vue.use(VanImage);

        Vue.prototype.$Dialog = Dialog.confirm;
        Vue.prototype.$Notify = Notify;
        Vue.prototype.$ToastErr = Toast.fail;
    }
};

export default vant;